-- GENERATED SPELL FOR [Wrath Corruptor] --


function spell0_22254(pUnit, Event) --@Corruption,n/a--
pUnit:FullCastSpellOnTarget(32063,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_22254', 26000, 1)
end

function spell1_22254(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(9613,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_22254', 3000, 1)
end

function Sorts_22254(pUnit, Event)
local choix_sorts_22254 = math.random(0, 1)
if choix_sorts_22254 == 0 then
pUnit:RegisterEvent('spell0_22254', 1, 1)
end
if choix_sorts_22254 == 1 then
pUnit:RegisterEvent('spell1_22254', 1, 1)
end
end

function mob22254_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_22254', math.random(1500, 3000), 1)
end

function mob22254_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob22254_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob22254_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(22254, 1, 'mob22254_Action')
RegisterUnitEvent(22254, 2, 'mob22254_Leave')
RegisterUnitEvent(22254, 3, 'mob22254_Kill')
RegisterUnitEvent(22254, 4, 'mob22254_Die')
